<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of VMT_Shoreline2GE_3D</title>
  <meta name="keywords" content="VMT_Shoreline2GE_3D">
  <meta name="description" content="Outputs the shoreline (3-D) from VMT to Google Earth (saved as a .kmz">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2005 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../m2html.css">
  <script type="text/javascript">
    if (top.frames.length == 0) { top.location = "../index.html"; };
  </script>
</head>
<body>
<a name="_top"></a>
<!-- menu.html trunk -->
<h1>VMT_Shoreline2GE_3D
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>Outputs the shoreline (3-D) from VMT to Google Earth (saved as a .kmz</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function VMT_Shoreline2GE_3D(A,Map,vscale,voffset) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment"> Outputs the shoreline (3-D) from VMT to Google Earth (saved as a .kmz
 file in the VMTProcFiles directory).  The file is then opened in Google
 Earth is for viewing.

 P.R. Jackson, USGS, 1-19-09</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../matlabicon.gif)">
</ul>
This function is called by:
<ul style="list-style-image:url(../matlabicon.gif)">
</ul>
<!-- crossreference -->



<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function VMT_Shoreline2GE_3D(A,Map,vscale,voffset)</a>
0002 <span class="comment">% Outputs the shoreline (3-D) from VMT to Google Earth (saved as a .kmz</span>
0003 <span class="comment">% file in the VMTProcFiles directory).  The file is then opened in Google</span>
0004 <span class="comment">% Earth is for viewing.</span>
0005 <span class="comment">%</span>
0006 <span class="comment">% P.R. Jackson, USGS, 1-19-09</span>
0007 
0008 
0009 brks = find(Map.UTMe == -9999);
0010 
0011 <span class="keyword">for</span> i = 1:length(brks)+1
0012     <span class="keyword">if</span> i == 1
0013         ll = 1;
0014         <span class="keyword">if</span> ~isempty(brks)
0015             ul = brks(i)-1;
0016         <span class="keyword">else</span>
0017             ul = length(Map.UTMe);
0018         <span class="keyword">end</span>
0019         indx =ll:ul;
0020     <span class="keyword">elseif</span> i == length(brks)+1
0021         ll = brks(i-1)+1;
0022         ul = length(Map.UTMe);
0023         indx =ll:ul;
0024     <span class="keyword">elseif</span> i &gt; 1 &amp; i &lt; length(brks)+1
0025         ll = brks(i-1)+1;
0026         ul = brks(i)-1;
0027         indx =ll:ul;
0028     <span class="keyword">end</span>
0029     
0030     gex = Map.UTMe(indx);
0031     gey = Map.UTMn(indx);
0032     gez = vscale.*voffset.*ones(size(Map.UTMn(indx)));
0033     
0034     utmzonemat = repmat(A(1).Comp.utmzone(2,:),size(gex)); <span class="comment">%</span>
0035     [sllat,sllon] = utm2deg(gex,gey,utmzonemat);
0036     
0037     outfile = [Map.infile(1:end-4) <span class="string">'_'</span> num2str(i)];
0038     
0039     GEplot_3DShoreLine(outfile,sllat,sllon,gez); 
0040     <span class="comment">%eval(['!' outfile '.kmz'])</span>
0041     
0042     clear gex gey gez utmzonemat sllat sllon 
0043     
0044 <span class="keyword">end</span></pre></div>
<hr><address>Generated on Wed 04-Jun-2014 14:21:02 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" target="_parent">m2html</a></strong> &copy; 2005</address>
</body>
</html>